<?php

return [

    //原始表达式 @{{ vue tags }}
    '[@]{1}{{(.*?)}}' => '<?php echo $this->original(\'${1}\'); ?>',

    //变量输出(未转义)
    '{!! \$(.*?) !!}' => '<?php echo $${1}; ?>',


    //运行函数并且输出 ( 函数无参数 )
    '{{ ([A-Za-z\_]{1}[A-Za-z0-9\_]{1,})\(\) }}'      => '<?php echo $this->runTemplateFunction("${1}"); ?>',

    //运行函数并且输出 ( 函数有参数 )
    '{{ ([A-Za-z\_]{1}[A-Za-z0-9\_]{1,})\((.*?)\) }}' => '<?php echo $this->runTemplateFunction("${1}", ${2}); ?>',

    //流程控制
    '@if\((.{1,10})\)'     => '<?php if ( ${1} ): ?>',
    '@elseif\((.{1,10})\)' => '<?php elseif( ${1} ): ?>',
    '@endif'               => '<?php endif; ?>',

    //Switch 语句


    //@for

    //@foreach

    //@while



    //@isset 和 @empty 标签对


    //@verbatim 标签对  有问题
    // '@verbatim'    => "<?php \n echo <<<EOF",
    // '@endverbatim' => "EOF; ",
    '[\n]{1}@verbatim([\s\S]*?)@endverbatim[\n]{1}'    => '---${1}---',

    //特殊
    '@json\((.{1,50})\)'   => '<?php echo "\'" .json_encode( ${1} ). "\'"; ?>',
    '@include\((.{1,50})\)'   => '<?php echo $this->include( ${1} ); ?>',





    /**
     * 布局相关
     */
    '@extends\((.{3,})\)'   => '',
    //定义块
    '@section\((.{3,})\)'   => '<?php echo $this->beginBlock( ${1} ); ?>',
    '@endsection'           => '<?php echo $this->endBlock(); ?>',
    //输出块
    '@block\(([A-Za-z0-9\_\'\"]{3,})\)'   => '<?php echo $this->echoBlock(${1}); ?>',




    //模板注释
    '{{--(.*)--}}' => '',

    //任意代码 转义输出 必须写最后面防止覆盖
    '{{(.*?)}}' => '<?php echo $this->encode(${1}); ?>',
];